log using "~/Desktop/APSR Replication/apsr_hurricanes.log", replace

********************************************************************************
* 									 FULL ANALYSIS							   *
********************************************************************************

clear all
set more off
set scheme s2color
grstyle init
grstyle set plain, horizontal grid dotted box
macro drop _all
est drop _all
set matsize 800
set seed 8675309

ssc install swindex, replace
ssc install ebalance, replace
ssc install estout, replace
ssc install did_imputation, replace
ssc install event_plot, replace
ssc install cem, replace
ssc install omegacoef, replace
ssc install diff, replace
ssc install sensemakr, replace

** Set Working Directory

if c(username) == "cb2257" {
global dir "~/Desktop"  // CWB's Directory
global main "${dir}/APSR Replication"
global code "${main}/Analysis"	
global data "${main}/Data"	
global figs "${main}/Figures"
global tabs "${main}/Tables"																			
}

if c(username) == "christopherblair" {
global dir "~/Desktop"  // CWB's Directory
global main "${dir}/APSR Replication"
global code "${main}/Analysis"	
global data "${main}/Data"	
global figs "${main}/Figures"
global tabs "${main}/Tables"																		
}

else if c(username) == "yourusername"{
global dir "~/yourfilepath"  // YOUR Directory
}

cd "${main}"

********************************************************************************

do "${code}/Hurricanes Clean and Process.do"

if c(username) == "cb2257" | c(username) == "christopherblair" {
global dir "~/Desktop"  // CWB's Directory
global main "${dir}/APSR Replication"
global code "${main}/Analysis"	
global data "${main}/Data"	
global figs "${main}/Figures"
global tabs "${main}/Tables"																			
}
do "${code}/Hurricane Main.do"

if c(username) == "cb2257" | c(username) == "christopherblair" {
global dir "~/Desktop"  // CWB's Directory
global main "${dir}/APSR Replication"
global code "${main}/Analysis"	
global data "${main}/Data"	
global figs "${main}/Figures"
global tabs "${main}/Tables"																			
}
do "${code}/Hurricane Robustness.do"

if c(username) == "cb2257" | c(username) == "christopherblair" {
global dir "~/Desktop"  // CWB's Directory
global main "${dir}/APSR Replication"
global code "${main}/Analysis"	
global data "${main}/Data"	
global figs "${main}/Figures"
global tabs "${main}/Tables"																			
}
do "${code}/Hurricane Heterogeneity.do"

if c(username) == "cb2257" | c(username) == "christopherblair" {
global dir "~/Desktop"  // CWB's Directory
global main "${dir}/APSR Replication"
global code "${main}/Analysis"	
global data "${main}/Data"	
global figs "${main}/Figures"
global tabs "${main}/Tables"																			
}
do "${code}/Hurricane Follow Up.do"

clear

********************************************************************************

clear all

log off
log close
